package tests;

import common.AutoTestUtils;
import org.openqa.selenium.By;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

import java.time.Duration;

public class RegistryPage extends AutoTestUtils {
    public static String url = "http://120.26.160.116:8080/blog_registry.html";

    public RegistryPage() {
        super(url);
    }

    /**
     * 注册页面可以正常打开, 点击验证码可以正常刷新
     */
    public void registrySuc() {
        String text = driver.findElement(By.cssSelector("body > div.container-login > div > h3")).getText();
        assert "注册".equals(text);

        webDriverWait.until(ExpectedConditions.textToBe(By.cssSelector("body > div.container-login > div > h3"), "注册"));
    }

    /**
     * 成功注册, 跳转到登录页面后可以正常登录
     */
    public void registryRight() {

    }

    /**
     * 账号或密码或url为空
     */
    public void registryNoParam(){

    }

    /**
     * 验证码为空
     */
    public void registryNoCaptcha(){

    }

    /**
     * 验证码错误
     */
    public void registryErrorCaptcha(){

    }



}
